
const koa = require('koa'),
      get = require('./get.js'),
      https = require('https'),
      http = require('http'),
      fs = require('fs'),
      koabody = require('koa-body');
      sslify = require('koa-sslify').default;
app = new koa({
	debug:true,
	http:true,
	key: '/usr/local/cert/www.h5weixin.club.key',
    	cert: '/usr/local/cert/www.h5weixin.club.crt'
});

app.use(koabody({
  multipart: true,
  strict: false
}));
var options = {
	key:fs.readFileSync('./www.h5weixin.club.key'),
	cert:fs.readFileSync('./www.h5weixin.club.crt')
};
app.use(sslify());
app.use(get.routes());


console.log("listen to 1000")
https.createServer(options,app.callback()).listen(1000);

